package com.ctshk.sapp.tour.controller;

import com.ctshk.common.annotations.OperationLogAnnotation;
import com.ctshk.common.dto.Result;
import com.ctshk.common.enums.OperationLogModel;
import com.ctshk.common.enums.OperationLogType;
import com.ctshk.rpc.tour.req.TripBasicInformationReq;
import com.ctshk.rpc.tour.service.ISeriesTripTeamRuleService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;
import com.ctshk.common.web.support.BaseController;

import javax.validation.Valid;

/**
 * <p>
 * 行程团队规则 前端控制器
 * </p>
 *
 * @author 谢诗宏
 * @since 2021-01-12
 */
@Api(value="新增行程--基本资料", tags="新增行程--基本资料")
@RestController
@RequestMapping("/series/trip/team/rule")
public class SeriesTripTeamRuleController extends BaseController {

    @DubboReference
    private ISeriesTripTeamRuleService iSeriesTripTeamRuleService;

    @ApiOperation(value = "新增行程-基本资料", notes = "新增行程-基本资料")
    @OperationLogAnnotation(operModul = OperationLogModel.TOUR, operType = OperationLogType.ADD, operTitle = "新增行程-基本资料", operDesc = "新增行程-基本资料")
    @PostMapping("/basic/information")
    public Result basicInformation(@RequestBody @Valid TripBasicInformationReq tripBasicInformationReq) {
        return Result.success(iSeriesTripTeamRuleService.basicInformation(tripBasicInformationReq,getCurrentUser(getRequest()).getId()));
    }



}
